package com.example.project.utils;

public class ThreadLocalUtil {
    private  static  final  ThreadLocal thread_local=new ThreadLocal<>();

    //根据键获取值   获取一个泛型数据
    public static <T> T get(){
        return (T) thread_local.get();
    }

    //存储键值对
    public  static  void set(Object value){
        thread_local.set(value);
    }

    //清除threadlocal
    public  static void  remove(){

        thread_local.remove();
    }





}

